package cn.kgc.itrip.mapper.itripHotelOrder;

import cn.kgc.itrip.beans.model.pojo.ItripHotelOrder;
import cn.kgc.itrip.beans.model.vo.order.OrderRomDatailVo;
import cn.kgc.itrip.beans.model.vo.order.itripOrderDatailVo;
import cn.kgc.itrip.beans.model.vo.order.itripOrderListVo;
import cn.kgc.itrip.beans.model.vo.order.itripRoomStore;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItripHotelOrderMapper {

    public ItripHotelOrder getItripHotelOrderById(@Param(value = "id") Long id) throws Exception;

    public List<ItripHotelOrder> getItripHotelOrderListByMap(Map<String, Object> param) throws Exception;

    public Integer getItripHotelOrderCountByMap(Map<String, Object> param) throws Exception;

    /**
     * 插入订单
     * @param itripHotelOrder
     * @return
     */
    public Integer insertItripHotelOrder(ItripHotelOrder itripHotelOrder);

    public Integer updateItripHotelOrder(ItripHotelOrder itripHotelOrder) throws Exception;

    public Integer deleteItripHotelOrderById(@Param(value = "id") Long id) throws Exception;

    /**
     * 查询个人订单列表
     *
     * @param map
     * @return
     */
    List<itripOrderListVo> getpersonalorderlist(Map<String, Object> map);

    /**
     * 查询个人订单总条数
     *
     * @param map
     * @return
     */
    Integer queryHotelOrderCount(Map<String, Object> map);
    /**
     * 根据订单编号查询订单详情
     */

    itripOrderDatailVo  queryOrderinfo(@Param("orderId") Integer orderId);

    OrderRomDatailVo queryOrderRoomDetail(@Param("orderId") Integer orderId);

    /**
     * 更新订单状态已取消
     * @return
     */

    Integer updateOrderStatusByCancel();
    /**
     * 更新订单状态已消费
     * @return
     */
    Integer updateOrderBySuccess();

    itripRoomStore queryRoomStore(Map<String, Object> map);

    //刷新实时库存表
    void flashStore(Map<String, Object> map);

    Integer getPatTypeByHotelId(@Param("orderId") Long orderId);
}
